package com.fwtai.web;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;

/**
 * 合同模版订单访问数据库
 * @作者 李宇鹏
 * @版本 v1.0
 * @创建时间 2022-12-09 16:10:37
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class ContractOrderDao{

  private final DaoHandle dao;

  public ContractOrderDao(final DaoHandle dao){
    this.dao = dao;
  }

  public Long queryExistById(final long kid){
    return dao.queryForLong("contract_order.queryExistById",kid);
  }

  public HashMap<String,Object> queryById(final long kid){
    return dao.queryForHashMap("contract_order.queryById",kid);
  }

  public List<HashMap<String,Object>> getListData(final PageFormData formData){
    return dao.queryForListHashMap("contract_order.listData",formData);
  }

  public Integer getListTotal(final PageFormData formData){
    return dao.queryForInteger("contract_order.listTotal",formData);
  }
}